package com.teemor.open.openauth.model;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @Description:
 * @author zhoulk
 * @date: 2020/5/29
 */
@Data
public class AuthUserModel implements Serializable {
    private static final long serialVersionUID = 4040119005328345135L;

    //token 默认超时时间，30分钟
    private static final Integer TOKEN_EXPIRE = 60 * 30;
    //refreshToken 默认超时时间 30天
    private static final Integer REFRESH_EXPIRE = 60 * 60 * 24 * 30;

    private String token;
    private String refreshToken;
    private Integer tokenExpire = TOKEN_EXPIRE;
    private Integer refreshExpire = REFRESH_EXPIRE;

    private Integer userId;
    private String userName;
    private String avatar;

    private List<Integer> roles;
}

